{% extends "base.html" %}
{% load custom_markdown %}

{% block content %}
    <div class="posts">
        {% for post in post_list %}
            <section class="post">
            <header class="post-header">
                <h2 class="post-title">
                    <a class="post-title" href="{% url 'detail' id=post_list %}">{{ post.title }}</a>
                </h2>
                <p class="post-meta">
                    Time: <a class="post-author" href="#">{{ post.date_time|date:'Y /m/d' }}</a>
                    <a class="post-category post-category" href="{% url 'search_tag' tag=post.category %}">{{ post.category|title }}</a>
                </p>
            </header>
            <div class="post-description">
                <p>
                    {{ post.content|custom_markdown }}
                </p>
            </div>
                <a class="pure-button" href="{% url 'detail' id=post.id %}">Read More</a>
            </section>
        {% endfor %}

    </div>
{% endblock %}